class GoodsListEntity {
  GoodsListData data;
  int code;
  String msg;

  GoodsListEntity({this.data, this.code, this.msg});

  GoodsListEntity.fromJson(Map<String, dynamic> json) {
    data =
        json['data'] != null ? new GoodsListData.fromJson(json['data']) : null;
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['list'] = this.data.toJson();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class GoodsListData {
  List<GoodsListDataData> datas;

  GoodsListData();

  GoodsListData.fromJson(Map<String, dynamic> json) {
    if (json['list'] != null) {
      datas = new List<GoodsListDataData>();
      (json['list'] as List).forEach((v) {
        datas.add(new GoodsListDataData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['list'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class GoodsListDataData {
  String goods_id;
  String cat_id;
  String goods_name;
  String goods_code;
  String img;
  String tmp_img;
  String video;
  String description;
  String brand_id;
  String clicknum;
  String old_price;
  Object price;
  String inventory;
  String num;
  String rate;
  String	name;
  String give_point;
  String logo;
  Object sales_volume;
  Object virtual_volume;
  String lv_price;
  List<GoodsListDataDatasTag> avatars;
  GoodsListDataData(
      {this.goods_id,
      this.cat_id,
      this.goods_name,
      this.goods_code,
      this.img,
      this.tmp_img,
      this.video,
      this.description,
      this.lv_price,
      this.brand_id,
      this.clicknum,
      this.old_price,
      this.price,
      this.avatars,
      this.inventory,
      this.num,
      this.give_point,
      this.virtual_volume,
      this.sales_volume});

  GoodsListDataData.fromJson(Map<String, dynamic> json) {
    goods_id = json['goods_id'].toString();
    goods_code = json['goods_code'];
    goods_name = json['goods_name'];
    img = json['img'];
    logo=json['logo'].toString().replaceAll("\\", "/");
    name=json['name'];
    rate=json['rate'].toString();
    tmp_img = json['tmp_img'];
    inventory = json['inventory'].toString();
    brand_id=json['brand_id'].toString();
    sales_volume = json['sales_volume'].toString();
    virtual_volume = json['virtual_volume'].toString();
    price = json['price'].toString();
    lv_price = json['lv_price'].toString();
    old_price = json['old_price'].toString();
    give_point = json['give_point'].toString();
    clicknum = json['clicknum'].toString();
    description = json['description'];
    num = json['num'].toString();
    avatars = new List<GoodsListDataDatasTag>();
    if(json['avatars']!=null)
    (json['avatars'] as List).forEach((v) {
      avatars.add(new GoodsListDataDatasTag.fromJson(v));
    });
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['goods_id'] = this.goods_id;
    data['goods_code'] = this.goods_code;
    data['img'] = this.img.replaceAll("\\", "");
    data['goods_name'] = this.goods_name;
    data['inventory'] = this.inventory;
    data['lv_price'] = this.lv_price;
    data['tmp_img'] = this.tmp_img;
    data['clicknum'] = this.clicknum;
    data['description'] = this.description;
    data['give_point'] = this.give_point;
    data['old_price'] = this.old_price;
    data['num'] = this.num;
    return data;
  }
}

class GoodsListDataDatasTag {
  String name;
  String url;
  String avatar;
  GoodsListDataDatasTag({this.name, this.url, this.avatar});

  GoodsListDataDatasTag.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    url = json['url'];
    avatar = json['avatar'].toString().replaceAll("\\", "/");
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['url'] = this.url;
    return data;
  }
}
